package model;

import java.util.ArrayList;

/**
 * 玩家类
 */
public class Player {
    private final ArrayList<Card> cards = new ArrayList<>();
    private int score = 0;
    private boolean need = true;

    public void addCard(Card card) {
        cards.add(card);
        score += card.value;
    }

    public void stopDeal() {
        need = false;
    }

    public ArrayList<Card> cards() {
        return cards;
    }

    public int score() {
        return score;
    }

    public boolean need() {
        return need;
    }

    public void clear() {
        cards.clear();
        score = 0;
        need = true;
    }
}